﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using Jayrock.Json;
using Jayrock.JsonRpc;
using Jayrock.JsonRpc.Web;

namespace TADF.Com.Alpha.Core.Event
{
    public class EventHandler : JsonRpcHandler
    {
       
        public void Init()
        {
        }

        public override void ProcessRequest(HttpContext context)
        {
            //传入的参数{"id":0,"method":"greetings","params":[]}
            //输出的参数{"id":0,"result":"Welcome!"}
            //context.Response.Write(@"{""id"":0,""result"":""Welcome!""}");
            //context.Response.Write(@"{""result"":""id"",""test"":1}");
            //context.Response.Write("<h1><b>Hello HttpHandler</b></h1>");
            //context.Session["Test"] = "测试HttpHandler容器中调用Class";
            //context.Response.Write(context.Session["Test"]);
            base.ProcessRequest(context);
        }       
        /*
        [JsonRpcMethod("greetings")]
        public string Greetings()
        {
            return "Welcome!";
        }*/
    }
}
